package com.etoak.stock.mapper;

import com.etoak.stock.pojo.domin.SysUserDomain;
import com.etoak.stock.pojo.entity.SysRole;
import com.etoak.stock.pojo.entity.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 孙有泽
* @description 针对表【sys_user(用户表)】的数据库操作Mapper
* @createDate 2024-09-15 19:14:18
* @Entity com.etoak.stock.pojo.entity.SysUser
*/
public interface SysUserMapper {

    int deleteByPrimaryKey(Long id);

    int insert(SysUser record);

    int insertSelective(SysUser record);

    SysUser selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysUser record);

    int updateByPrimaryKey(SysUser record);
    //根据用户的姓名查询用户
    SysUser finUserInfoByUserName(@Param("username") String username);

    List<SysUserDomain> getUsers(@Param("userName") String userName, @Param("nickName")String nickName,@Param("startTime") String startTime,@Param("endTime") String endTime);

    int addUser(@Param("user") SysUser user);


    SysUser getUserById(@Param("userId") Long userId);

    int updateUser(@Param("updateUserVo") SysUser updateUserVo);

    List<SysRole> getRoleByUserId(@Param("id") Long id);

    int deleteBatchUser(@Param("ids") List<Long> ids);
}
